#ifndef MESSAGE_H
#define MESSAGE_H

#include "../Utils/ByteArray.h"



class Message
{
public:

	bool isReceived;
	bool isNeedCloseConnection;
		
protected:

	static const unsigned int MSG_OFFSET_TYPE = 0;
	static const unsigned int MSG_OFFSET_ID = MSG_OFFSET_TYPE + sizeof(int);

	ByteArray* m_data;

public:

	Message(int type, std::string id);
	~Message();
	
	ByteArray* getData();
	void setData(ByteArray* data);
	int getType();
	std::string getId();
};

#endif